|
|
|
|
|
|
|
Listing 18.9. Coding the cmdRDOConnection_Click event. |
|
|
|
|
|
|
|
|
Private Sub cmdRDOConnection_Click()
'
' show resultsets
'
Dim strMsg As String
Dim rdoEnv As rdoEnvironment
Dim rdoCon As rdoConnection
Dim rdoNewCon As rdoConnection
Dim aryCursorDriver As Variant
'
aryCursorDriver = Array("rdUseIfNeeded", "rdUseOdbc", "rdUseServer",
"rdUseClientBatch", "rduseNone")
'
Set rdoEnv = rdoEngine.rdoCreateEnvironment("rdoTEMP", "admin", "")
Set rdoNewCon = rdoEnv.OpenConnection("RDC Books5")
'
For Each rdoCon In rdoEnv.rdoConnections
strMsg = strMsg & "AsyncCheckInterval=" &
CStr(rdoCon.AsyncCheckInterval) & vbCrLf
strMsg = strMsg & "Connect=" & rdoCon.Connect & vbCrLf
strMsg = strMsg & "CursorDriver=" & aryCursorDriver(rdoCon.CursorDriver)
& vbCrLf
strMsg = strMsg & "hDbc=" & CStr(rdoCon.hDbc) & vbCrLf
strMsg = strMsg & "LoginTimeOut=" & CStr(rdoCon.LoginTimeout) & vbCrLf
strMsg = strMsg & "LogMessages=" & rdoCon.LogMessages & vbCrLf
strMsg = strMsg & "Name=" & rdoCon.Name & vbCrLf
strMsg = strMsg & "QueryTimeOut=" & CStr(rdoCon.QueryTimeout) & vbCrLf
strMsg = strMsg & "RowsAffected=" & CStr(rdoCon.RowsAffected) & vbCrLf
strMsg = strMsg & "StillConnecting=" & CStr(rdoCon.StillConnecting) &
vbCrLf
strMsg = strMsg & "StillExecuting=" & CStr(rdoCon.StillExecuting) &
vbCrLf
strMsg = strMsg & "Transactions=" & CStr(rdoCon.Transactions) & vbCrLf
strMsg = strMsg & "Updatable=" & CStr(rdoCon.Updatable) & vbCrLf
strMsg = strMsg & "Version=" & rdoCon.Version & vbCrLf
Next
'
MsgBox strMsg, vbInformation, "rdoConnection"
'
rdoNewCon.Close
rdoEnv.Close
Set rdoEnv = Nothing
Set rdoCon = Nothing
Set rdoNewCon = Nothing
'
End Sub |
|
|
|
|
|
|
|
|
Save and run the project. After you click the Connection button, you'll see a display of all the default properties of an rdoConnection object, as shown in Figure 18.9. |
|
|
|
|
|